package cmd

import (
	"fmt"
	"github.com/spf13/cobra"
	"wzgames/internal/version"
)

func Version() *cobra.Command {
	versionCmd := &cobra.Command{
		Use:   "version",
		Short: "the version of wz games",
		Long:  `the version of wz games`,
		Run: func(cmd *cobra.Command, args []string) {
			fmt.Printf("Version   : %s\n", version.Ver)
			fmt.Printf("BuildDate : %s\n", version.BuildDate)
		},
	}

	return versionCmd
}
